* {
  box-sizing: border-box;
}

body {
  font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
  background-color: #f3f4f6;

  &.site {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
  }
}

a {
  &:hover {
    text-decoration: none;
  }

  &.disabled {
    pointer-events: none;
    cursor: default;
  }
}

a,
span {
  &.submission-icon-container {
    text-decoration: none;

    .success {
      fill: #28a745;
    }

    .failed {
      fill: #d73a49;
    }

    .neutral {
      fill: #6a737d;
    }
  }
}

.submission-icon-container {
  text-decoration: none;
  cursor: pointer;

  .success {
    fill: $green;
  }

  .failed {
    fill: $red;
  }
}

main {
  flex: 1;
}

.octicon {
  display: inline-block;
  vertical-align: middle;
  fill: currentColor;
}

.site-header {
  padding-top: 1rem;
  padding-bottom: 1rem;
  color: #ccc;
  background-color: #2f3232;
}

.site-logo {
  width: 188px;
  height: 20px;
  margin-top: 0.3rem;

  @media screen and (max-width: 40em) {
    display: block;
    float: none;
    margin-right: auto;
    margin-bottom: 1rem;
    margin-left: auto;
  }
}

.site-nav {
  float: right;
  margin-top: 0.1rem;
  font-size: 0.9rem;

  ul {
    display: inline-block;
    list-style-type: none;

    li {
      display: block;
      float: left;
      margin-left: 2rem;

      @media screen and (max-width: 40em) {
        margin-left: 0;
      }

      .octicon {
        font-size: 18px;
      }
    }
  }

  a {
    display: block;
    height: 28px;
    padding-top: 4px;
    padding-bottom: 4px;
    color: rgba(255, 255, 255, 0.5);

    @media screen and (max-width: 40em) {
      margin-right: 1rem;
      margin-left: 1rem;
    }
  }

  a:hover {
    color: rgba(255, 255, 255, 1);
  }

  @media screen and (max-width: 40em) {
    width: 100%;
    padding-top: 1rem;
    margin-bottom: 0.8rem;
    text-align: center;
    border-top: 0.075rem solid rgba(255, 255, 255, 0.25);
  }
}

.organization-banner {
  padding-top: 1rem;
  padding-bottom: 1rem;
  color: #fff;
  background-color: #5fb27b;

  .btn {
    float: right;
    margin-top: 1.7rem;
  }

  @media screen and (max-width: 40em) {
    padding-right: 1rem;
    padding-left: 1rem;

    .btn {
      display: none;
    }
  }
}

.organization-name {
  margin-bottom: 0;
  font-size: 2.2rem;
  font-weight: normal;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);

  a {
    color: inherit;
  }

  @media screen and (max-width: 40em) {
    font-size: 1.5rem;
  }
}

.organization-login {
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 1rem;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);
  opacity: 0.8;

  a {
    color: inherit;
  }
}

.site-content,
.menu {
  margin-top: 1rem;
}

.site-content-cap {
  padding: 1.5rem 2rem;
  background-color: #fbfbfb;
  border: solid 1px #e3e3e3;
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;

  .btn {
    margin-top: -5px;
  }

  @media screen and (max-width: 40em) {
    padding: 1.5rem 1rem;
  }
}

.site-content-body {
  padding: 2rem;
  background-color: #fff;
  border: solid 1px #e3e3e3;
  border-top: 0;
  border-bottom-right-radius: 3px;
  border-bottom-left-radius: 3px;

  &.tabnav-body {
    padding-top: 1rem;
    padding-right: 1rem;
    padding-left: 1rem;
  }

  @media (max-width: 43em) {
    padding: 1rem;
  }
}

.site-content-heading {
  padding-top: 0.3rem;
  margin-top: 0;
  margin-bottom: 0;
  font-size: 20px;
  font-weight: normal;
  color: #5d666f;
}

.assignment-option-name {
  margin-bottom: 0;
  font-size: 20px;
  font-weight: normal;
}

.assignment-option-description {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  color: #777;
}

.assignment-icon,
.group-assignment-icon {
  display: inline-block;
  width: 45px;
  height: 45px;
  margin-right: 0.7rem;
  text-align: center;
  border-radius: 50%;

  .octicon {
    height: 45px;
    font-size: 22px;
    line-height: 45px;
  }
}

.assignment-icon-individual {
  color: #555;
  background-color: rgba(216, 216, 216, 0.3);
}

.assignment-icon-group {
  color: #f3f3f3;
  background-color: #555;
}

.assignment-list-items {
  .assignment-list-item:not(:first-child) {
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid #e3e3e3;

    @media screen and (max-width: 40em) {
      padding-top: 1rem;
      margin-top: 0.5rem;
    }
  }

  .assignment-list-item:not(:last-child) {
    margin-bottom: 1rem;
  }
}

.assignment-name-link {
  padding-top: 0.4rem;
  margin-top: 0;
  margin-bottom: 0;
}

.assignment-type {
  margin-top: 0;
  margin-bottom: 0;

  @media screen and (max-width: 40em) {
    display: inline-block;
    max-width: 125px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: top;
  }
}

.assignment-invite-link {
  float: right;
}

.table-minimal {
  td {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  td:first-child {
    padding-left: 0;
  }
}

hr {
  border-bottom: 1px solid #e3e3e3;
}

.dangerzone-container {
  padding-bottom: 13px;
  border: 1px solid #e3e3e3;
  border-radius: 3px;
}

.invitation-content {
  padding-bottom: 2rem;
  border-bottom: 1px solid #e3e3e3;

  @media screen and (max-width: 40em) {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
  }
}

.assignment-repo-github-url {
  h3 {
    margin-top: 0;
    margin-bottom: 0;
  }
}

.user-list {
  margin-top: 2px;
}

.assignment-repo-list {
  .assignment-repo-list-item:not(:first-child) {
    border-top: 1px solid #e3e3e3;
  }
}

.assignment-repo-list-item {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  font-size: 14px;

  &:last-child {
    padding-bottom: 0;
  }

  .octicon-alert {
    display: none;
  }

  &.disabled {
    a {
      color: $gray;
    }

    .avatar {
      filter: grayscale(1);
    }
  }

  &.is-error {
    background-color: rgba($red, 0.9);
    border-radius: 3px;

    &.assignment-repo-list-item {
      .octicon-alert {
        display: unset;
        fill: #fff;
      }

      .spinner {
        display: none;
      }
    }
  }

  .avatar {
    margin-right: 10px;

    @media screen and (max-width: 40em) {
      margin-right: 0;
    }
  }

  .css-truncate-target {
    max-width: 20rem;

    @media screen and (max-width: 40em) {
      max-width: 10rem;
    }
  }

  .team-name {
    display: block;
    color: $gray-dark;

    &:hover {
      color: $blue;
    }
  }

  ul {
    list-style-type: none;

    li {
      display: inline-block;

      @media screen and (max-width: 40em) {
        margin-left: 0;
      }
    }
  }
}

.avatar-large {
  margin-right: 10px;
}

.assignment-repo-button {
  margin-left: 80px;

  @media screen and (max-width: 40em) {
    margin-left: 15px;
  }
}

.organization-list-items {
  .organization-list-item:not(:first-child) {
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid #e3e3e3;

    @media screen and (max-width: 40em) {
      padding-top: 1rem;
      margin-top: 1rem;
    }
  }
}

.organization-list-item {
  font-size: 16px;

  .avatar {
    margin-right: 10px;
  }

  .organization-title {
    display: block;
    padding-top: 0.4em;

    &:hover {
      color: $blue;
    }
  }

  .organization-stats {
    padding-top: 0.5em;
    font-size: 14px;
    font-weight: bold;
    vertical-align: inherit;

    .organization-stat-item {
      margin-right: 0.6em;

      .octicon {
        margin-right: 4px;
        font-size: 16px;
      }
    }

    @media screen and (max-width: 40em) {
      display: none;
    }
  }
}

.site-footer {
  margin-top: 2em;
  margin-bottom: 2em;
  color: #777;
}

.made-with-heart {
  margin-bottom: 0.3em;
  font-size: 15px;

  a {
    position: relative;
    color: #777;
    text-decoration: none;
    transition: 0.2s color ease-in 0;

    &:hover { color: #333; }
  }
}

.desktop-invitation-content,
.settings,
.student-information,
.clipboard-form,
.classroom-user-name {
  @media screen and (max-width: 40em) {
    display: none;
  }
}

.mobile-invitation-content {
  display: none;

  @media screen and (max-width: 40em) {
    display: block;
  }
}

.blankslate.spacious {
  @media screen and (max-width: 40em) {
    padding: 1rem 0;
  }
}

.signin-section {
  padding: 6.154em 20px 4.103em;
  margin-bottom: 1.5em;
  color: #fff;
  background-color: #5fb27b;

  .container {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .heading {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 48px;
    font-weight: normal;

    @media screen and (max-width: 40em) {
      font-size: 8vw;
    }
  }

  .subheading {
    margin-top: 0.5em;
    font-size: 21px;

    @media screen and (max-width: 32em) {
      margin-bottom: 2em;
      font-size: 4vw;
    }
  }

  a {
    overflow: hidden;
    font-weight: normal;
    text-overflow: ellipsis;
    white-space: nowrap;

    &.open-video {
      padding: 7.5px 15px;
      margin-bottom: 35px;
      font-size: 0.9rem;
      color: #5fb27b;
      cursor: pointer;
      background-color: #f4f5f5;
      border-radius: 50px;

      img {
        height: 24px;
        margin-right: 8px;
        vertical-align: middle;
      }

      &:hover {
        color: #5fb27b;
        background-color: darken(#f4f5f5, 5%);
      }

      &:active,
      &.selected {
        background-color: darken(#dfdddd, 5%);
      }

      &.selected:hover {
        background-color: darken(#dfdddd, 10%);
      }

      @media screen and (max-width: 40em) {
        margin-bottom: 20px;
      }
    }
  }

  .octicon {
    font-size: 38px;
  }

  ul {
    margin-bottom: 15px;
    list-style-type: none;

    li {
      display: inline-block;
      margin-left: 2rem;
      opacity: 0.4;

      @media screen and (max-width: 40em) {
        display: none;
      }
    }
  }
}

.information-section {
  h2 {
    font-size: 21px;
    font-weight: normal;
  }

  p {
    padding-right: 0.5rem;
    font-size: 16px;
  }

  .octicon {
    margin-right: 5px;
    font-size: 21px;
  }

  .column {
    padding: 0 20px;
  }
}

.organization-select-target {
  float: left;
  padding: 10px;
  margin: 0 10px 20px;
  font-weight: bold;
  text-align: center;
  background-color: #f2f2f2;
  background-image: none;
  border: 0;
  border-radius: 3px;

  &:hover,
  &:active,
  &.selected {
    color: #fff;
    background-color: $blue;
    background-image: none;
    border-color: $blue;
  }

  &.disabled {
    color: #999;
    cursor: not-allowed;

    .organization-select-avatar {
      opacity: 0.3;
    }
  }

  .css-truncate-target {
    max-width: 90px;
  }
}

.organization-select-avatar {
  display: block;
  margin-bottom: 9px;
}

.organization-grant-access-avatar {
  display: table;
  width: 127px;
  height: 147px;
}

.organization-grant-access-text {
  display: table-cell;
  vertical-align: middle;
}

.search-results {
  margin-top: 2em;
}

.classroom-resources {
  margin-bottom: 4em;
  border-top: solid 1px #e3e3e3;

  .classroom-resource-item:not(:last-child) {
    padding-bottom: 1em;
  }
}

.classroom-resource-item {
  margin-top: 1rem;
  font-size: 14px;

  &.disabled {
    a {
      color: $gray;
    }

    .avatar {
      filter: grayscale(1);
    }
  }

  .avatar {
    margin-right: 10px;
  }

  .octicon-search {
    opacity: 0.3;
  }

  .css-truncate-target {
    max-width: 45rem;
  }

  .search-result-title {
    display: block;
    padding-top: 4px;
    color: $gray-dark;

    &:hover {
      color: $blue;
    }
  }
}


.team-grid {

  .team-left {
    float: left;
    padding-right: 5px;
  }

  .team-right {
    float: left;
    padding-left: 5px;
  }

  .team {
    padding-right: 10px;
  }
}

.team-description {
  font-size: 13px;
  font-style: normal;
  font-weight: normal;
  line-height: 0;
  color: #777;
}

.team-members {
  padding: 5px 0 0;

  .team-member:not(:first-child) {
    margin-top: 10px;
  }
}

.member-list {
  min-height: 35px;

  .member {
    display: inline-block;
    width: 30px;
    height: 30px;
    margin: 0 5px 5px 0;

    .avatar {
      vertical-align: baseline;
    }
  }

  .member-draggable a {
    cursor: grab;
  }

  .no-scroll {
    height: 100%;
    overflow: hidden;
  }

  .student-avatar {
    float: left;
    margin-right: 10px;
  }
}

.student-information {
  margin-left: 50px;
}

.student-login {
  display: block;
  padding-top: 4px;
  margin: 0;
  font-size: 14px;
  font-weight: bold;
  line-height: 20px;
  color: $gray-dark;

  &:hover {
    color: $blue;
  }
}

.student-description {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: #767676;
}

.student-handle {
  float: left;
  width: 24px;
  height: 40px;

  svg {
    height: 40px;
  }
}

.label {
  display: inline-block;
  padding: 3px 4px;
  font-size: 11px;
  font-weight: bold;
  line-height: 1;
  color: #666;
  background-color: #eee;
  border-radius: 2px;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12);
}

.flash.flash-error p:first-of-type {
  margin-top: 0;
}

.repo-detail-item {
  margin-right: 15px;
  text-decoration: none;

  &:not(:hover) {
    color: #000;
  }
}

.assignment-properties {
  margin-top: 5px;
}

.form.short-field {
  width: 500px;
}

.tabnav-body .assignment-list-items {
  padding-right: 1rem;
  padding-left: 1rem;
}

.tabnav-link {
  cursor: pointer;
}

.hidden-tab {
  display: none;
}

.right-button {
  margin-left: auto;
}

.fixed-height-row {
  height: 56px;
}

.remodal-user {
  padding-left: 0;
  margin-bottom: 8px;
  color: $blue;
  cursor: pointer;
  background-color: transparent;
  border: 0;


  &:focus {
    outline: none;
  }

  &:last-child {
    margin-bottom: 0;
  }
}

.remodal-user-list {
  max-height: 200px;
  overflow: scroll;
}

.assignment-container {
  padding-top: 2rem;
}

div.site-content-body.tabnav-body.join-box {
  padding-right: 0;
  padding-bottom: 1rem;
}

.remove-roster-entry-button {
  margin-left: 10px;
  fill: #333;
  opacity: 0.25;

  &:hover {
    opacity: 1;
  }
}

.clickable {
  cursor: pointer;
}

.form-checkbox:last-of-type {
  margin-bottom: 0;
}
